package com.lz.gmall.item.controller;

import com.lz.gmall.common.result.Result;
import com.lz.gmall.item.service.AopSkuInfoService;
import com.lz.gmall.product.entity.SkuInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//测试代码
@RestController
@RequestMapping(value = "/aop")
public class AopSkuInfoController {

    @Autowired
    private AopSkuInfoService aopSkuInfoService ;

    @GetMapping(value = "/findSkuInfoById/{skuId}")
    public Result<SkuInfo> findSkuInfoById(@PathVariable(value = "skuId") Long skuId) {
        SkuInfo skuInfo = aopSkuInfoService.findSkuInfoById(skuId);
        return Result.ok(skuInfo );
    }
}
